<?php


class TbfSession {
    //向session中设置一个值
    public static function set($key,$value){
        TbfRuntime::get()->getSessionProvider()->set($key,$value);
    }
    //从session中取出一个值
    public static function get($key){
        return TbfRuntime::get()->getSessionProvider()->get($key);
    }
    //刷新session,主要用于登陆
    public static function regenerate(){
        TbfRuntime::get()->getSessionProvider()->regenerate();
    }
    //清空session,主要用于登出
    public static function clear(){
        TbfRuntime::get()->getSessionProvider()->clear();
    }
    public static function getAll(){
        return TbfRuntime::get()->getSessionProvider()->getAll();
    }
    public static function setAll($data){
        TbfRuntime::get()->getSessionProvider()->setAll($data);
    }
}